package cn.taobaoke.restful.exception;

/**
 * 自定义异常。
 * @author yangzuo
 * @since 2017-03-11
 */
public class TBKException extends RuntimeException {

    public TBKException() {
        super();
    }

    public TBKException(String message) {
        super(message);
    }

    public TBKException(String message, Throwable cause) {
        super(message, cause);
    }

    public String toJson() {
        return String.format("{ \"success\":false, \"message\": \"%s\" }", getMessage());
    }
}
